﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using VOL.Entity.SystemModels;

namespace VOL.Entity.DomainModels
{
    //public class Product
    //{
    //    public int Id { get; set; }
    //}

    [Entity(TableCnName = "产品管理", TableName = "Product", DBServer = "VOLContext")]
    public partial class Product : BaseEntity
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        [Key]
        [Display(Name = "Id")]
        [MaxLength(36)]
        [Column(TypeName = "bigint")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public long Id { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        [Display(Name = "产品名称")]
        [MaxLength(100)]
        [Column(TypeName = "nvarchar(100)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string ProductName { get; set; }

        /// <summary>
        /// 产品编码
        /// </summary>
        [Display(Name = "产品编码")]
        [MaxLength(100)]
        [Column(TypeName = "nvarchar(100)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string BarCode { get; set; }

        /// <summary>
        /// 样例条码
        /// </summary>
        [Display(Name = "样例条码")]
        [Column(TypeName = "nvarchar(100)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string ExampleBarcode { get; set; }

        /// <summary>
        /// 图片个数
        /// </summary>
        [Display(Name = "图片个数")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int ImgNum { get; set; }

        /// <summary>
        /// 任务个数
        /// </summary>
        [Display(Name = "任务个数")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int TaskNum { get; set; }

        /// <summary>
        /// 产品状态(0:禁用 1:启用 2:删除)
        /// </summary>
        [Display(Name = "产品状态")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int Status { get; set; }

        /// <summary>
        ///创建人
        /// </summary>
        [Display(Name = "创建人")]
        [MaxLength(100)]
        [Column(TypeName = "nvarchar(100)")]
        [Editable(true)]
        public string Creater { get; set; }

        /// <summary>
        ///创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        [Display(Name = "修改人")]
        [MaxLength(100)]
        [Column(TypeName = "nvarchar(100)")]
        [Editable(true)]
        public string UpdateUser { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        [Display(Name = "修改时间")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? UpdateTime { get; set; }

    }
}
